home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1745 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.2 KB

  1. Path: theory.lcs.mit.edu!wald
  2. From: wald@theory.lcs.mit.edu (David Wald)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Beginner Questions
  5. Date: 12 Jan 1996 17:45:51 GMT
  6. Organization: Theory of Computation, LCS, MIT
  7. Message-ID: <WALD.96Jan12124552@woodpecker.lcs.mit.edu>
  8. References: <03e46273@brazerko.com>
  9. NNTP-Posting-Host: woodpecker.lcs.mit.edu
  10. In-reply-to: szarka@brazerko.com's message of Thu, 11 Jan 96 18:37:38 -0500
  11.  
  12. In article <03e46273@brazerko.com> szarka@brazerko.com (Szarka)
  13. writes:
  14. >Except that--and please check my understanding here as I'm a beginner,
  15. >too--recursive functions cannot be completely expanded inline.  Only the
  16. >first iteration is expanded.
  17.  
  18. That's compiler-dependent.  Some won't inline recursive functions at
  19. all; some will inline to a given depth (sometimes greater than 1); and
  20. it's not all that difficult for a compiler to fully inline a
  21. tail-recursive function.  As with any use of "inline", there are no
  22. platform-independent guarantees.
  23.  
  24. -David
  25. -- 
  26. ============================================================================
  27. David Wald      http://theory.lcs.mit.edu/~wald/     wald@theory.lcs.mit.edu
  28. ============================================================================
  29.